package cn.sf.sufingcommentconsumer.service;

import cn.sf.pojo.Comment;
import cn.sf.pojo.Reply;
import cn.sf.pojo.Video;
import cn.sf.vo.VideoAll;
import cn.sf.vo.VideoComment;
import cn.sf.vo.VideoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "sufing-comment-provider")
public interface CommentService {

    @RequestMapping("/queryCommentAndReply")
    public List<Comment> queryCommentAndReply(@RequestParam("videoId") long videoId);

    @RequestMapping("/addComment")
    public boolean addComment(@RequestParam("userId") long userId,
                              @RequestParam("videoId") long videoId,
                              @RequestParam("message") String message,
                              @RequestParam("picture") String picture);

    @RequestMapping("/addReply")
    public boolean addReply(@RequestBody Reply reply);

    @RequestMapping("/queryCommentCount")
    public int queryCommentCount(@RequestParam("videoId") long videoId);
}
